package com.isoft.farm.controller;

import com.isoft.farm.common.JsonResult;
import com.isoft.farm.common.PageObject;
import com.isoft.farm.entity.SysLog;
import com.isoft.farm.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("log")
public class SysLogController {
    @Autowired
    SysLogService sysLogService;
    @RequestMapping("doFindPageObjects")
    @ResponseBody
    public JsonResult doFindPageObjects(String username,Integer pageCurrent){

        PageObject<SysLog> pageObjects=sysLogService.findPageObjects(username,pageCurrent);
        return new JsonResult(pageObjects);
    }
    @RequestMapping("doDeleteObjects")
    @ResponseBody
    public  JsonResult doDeleteObjects(Integer... ids){
        sysLogService.deleteObjects(ids);
        return new JsonResult();
    }
}
